package com.xiaoxin.experience.system.log;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author xiaoxin
 */
@Aspect
@Order(0)
@Component
public class ServiceAspectAdvice
{

    @Around("execution(public * com.xiaoxin..*ServiceImpl.*(..)) && !@annotation(com.xiaoxin.experience.system.log.LogExecution)")
    public Object around(ProceedingJoinPoint pjp)
            throws Throwable
    {
        MethodAspectHelper helper = new MethodAspectHelper(pjp);
        return helper.logExecute();
    }
}
